package org.hk.kg.finance.fee.action;

import java.util.List;
import java.util.Map;

import org.hk.kg.TraceObject;
import org.hk.kg.db.DBServiceProxy;
import org.hk.kg.finance.FinanceConstants;
import org.hk.kg.finance.stuclz.service.IStuClzService;
import org.hk.kg.finance.stuclz.service.StuClzService;
import org.hk.kg.ui.ParamsStack;
import org.hk.kg.utils.Constants;
import org.hk.kg.web.BaseAction;

public class FeeClzAction extends BaseAction{
	private IStuClzService stuClzServ = DBServiceProxy.getProxyClz(StuClzService.class);
	public String getClasses() {
		StringBuffer sbf=new StringBuffer();
		List<Map> rlt = stuClzServ.query();
		for(Map m : rlt)
		{
			sbf.append("<tr>")
					.append("<td><a href=#trun2feeStu?clzId=\"").append(m.get("stuClzId")).append("\">").append(m.get("stuClzName")).append("</a></td>")
				.append("<td>")
					.append(Constants.CONFIG.getValue(FinanceConstants.CLZ_TYPE_CONSTANTS,"" + m.get("stuClzType")))
				.append("</td>")
				.append("</tr>");
		}
		return sbf.toString();
	}
	
	public TraceObject trun2feeStu(ParamsStack stack)
	{
		TraceObject rlt = new TraceObject("fee_stu");
		rlt.addParam("clzId", stack.getValue("clzId"));
		return rlt;
	}
}
